{extend name='admin@public/content'}

{block name="content"}
<form onsubmit="return false;" action="{if !empty($vo.wechat_openid)}{:url('wx_fans/delBind')}{else}{:url('wx_fans/bind')}{/if}" data-auto="true" method="post" id="ProductForm"
      class='form-horizontal layui-form padding-top-20'>

    <div class="form-group">
        <label class="col-sm-2 control-label">微信头像</label>
        <div class='col-sm-8'>
            <img class="po-avt data-avt" src="{$vo.headimgurl|default=''}" title="" style="width: 80px;height: 80px">
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">微信昵称</label>
        <div class='col-sm-8'>
            <input name="name" required value="{$vo.nickname|default=''}" class="layui-input" disabled>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">性别</label>
        <div class='col-sm-8'>
            <input name="name" required value="{$vo.sex==1?'男':($vo.sex==2?'女':'未知')}" class="layui-input" disabled>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label">所在地区</label>
        <div class='col-sm-8'>
            <input name="name" required value="{$vo.country}{$vo.province}{$vo.city}" class="layui-input" disabled>
        </div>
    </div>

    <div class="lq-form-title title-style-1">绑定会员信息</div>

    <!--{if !empty($vo.wechat_openid)}-->
        <div class="form-group">
            <label class="col-sm-2 control-label">会员姓名</label>
            <div class='col-sm-8'>
                <input name="mobile" required value="{$vo.name}" class="layui-input" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">手机号码</label>
            <div class='col-sm-8'>
                <input name="mobile" required value="{$vo.mobile}" class="layui-input" disabled>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">绑定时间</label>
            <div class='col-sm-8'>
                <input name="mobile" required value="{$vo.bind_time}" class="layui-input" disabled>
            </div>
        </div>
        <div class="col-sm-7 col-sm-offset-2">
            <div class="layui-form-item text-center">
                {if !empty($vo.member_id)}<input type="hidden" name="id" value="{$vo.member_id}">{/if}
                <button class="layui-btn" type="submit">解除绑定</button>
            </div>
        </div>
    <!--{else}-->
        <div class="form-group">
            <label class="col-sm-2 control-label">手机号或会员卡号</label>
            <div class='col-sm-8'>
                <input name="mobile" required value="" class="layui-input" maxlength="11">
            </div>
        </div>
        <div class="col-sm-7 col-sm-offset-2">
            <div class="layui-form-item text-center">
                {if !empty($vo.id)}<input type="hidden" name="id" value="{$vo.id}">{/if}
                <button class="layui-btn" type="submit">绑定</button>
                <button class="layui-btn layui-btn-danger" type='button' onclick="window.history.back()">取消</button>
            </div>
        </div>
    <!--{/if}-->


</form>

{/block}
